export type User = {
  id: number,
  username: string,
  email: string,
  role: string,
  createAt: string,
  updateAt: string,
  status: string
}

export type LoginRequest = {
  username: string,
  email: string
  password: string,
  captcha: string,
  usernameValid?: boolean,
  illegalLoginKey?: boolean,
  illegalRegisterKey?: boolean
}

export type LoginResponse = {
  code: number,
  msg: string,
  data: {
    user: User,
    token: string
  }
}

export type NoneResponse = {
  code: number,
  msg: string,
  data: null
}

export type GetUserInfoResponse = {
  code: number,
  msg: string,
  data: {
    total: number,
    records: User[]
  }
}

export type UpdataUserInfoRequest = {
  username: string,
  email: string,
  password?: string,
  role: string
}